<?
import("iforum.web.iForumWebAppContext");

/**
 * get style folder
 * 
 * @package  
 * @author   iCer <iCer@justdn.com>
 * @version  $Id: StyleHelper.php,v 1.1 2005/04/06 04:07:55 icer Exp $
 */
 class StyleHelper
 {
 	function getStyleFolder()
	{
		$context = Singleton::instance('iForumWebAppContext');
		$daoFactory = $context->getDaoFactory();
		$dao = $daoFactory->getStyleDAO();
		
		$request = $context->getRequest();
		$para = $request->getParameter('fid');
		if ($para == false)
		{
			$style = $dao->getDefaultStyle();
		}
		else
		{
			$style = $dao->getForumStyle($para);
		}
		$this->_style = $styleFolder = $style['sFolder'];
		return $styleFolder;
	}

	function getDefaultStyle()
	{
		$context = Singleton::instance('iForumWebAppContext');
		$daoFactory = $context->getDaoFactory();
		$dao = $daoFactory->getStyleDAO();
		
		$style = $dao->getDefaultStyle();

		$styleFolder = $style['sFolder'];
		return $styleFolder;	
	}
	
	function getAdminStyle()
	{
		
	}
 }

?>